<!--
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * "Support Open Source software. What about a donation today?"
 * 
 * File Name: fck_image.html
 * 	Image Properties dialog window.
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>Insert Image</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="robots" content="noindex, nofollow">

    <script src="../../../../script/jquery-1.4.2.js"></script>

    <script src="../../dialog/common/fck_dialog_common.js" type="text/javascript"></script>

    <script src="fck_image/fck_image.js" type="text/javascript"></script>

    <link href="../../dialog/common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
    <script>

        function OpenCatalogSelector() {

            var year = 0;
            var urldata = "../../../../eAccount/system/dirChoose.aspx?year=" + year;
            var result = window.showModalDialog(urldata, "目录选择", "dialogHeight:500px;dialogWidth:350px;");
            if (typeof (result) != "undefined") {
                if (result != "-1") {
                    var reslist = result.split('|');
                    if (reslist.length > 0) {
                        $("#txt_dirid").val(reslist[1]);
                        $("#hdtxtdir").val(reslist[0]);
                        $("#txtAlt").val(reslist[1]);
                        //window.open("../../../../eAccount/managerdoc/mainpage.aspx");
                        //$("#txt_" + RowIndex).val(reslist[1]);
                        //$("#txt_" + RowIndex).attr("name", reslist[0]);
                    }
                }
            }
        }
        function dirTypeChange() {
            var dirType = $("#dirType").val();
            $("#div_lndztz").css("display", "none");
            $("#div_bnddztz").css("display", "none");
            $("#div_zdnddztz").css("display", "none");
            $("#div_zdjtdztz").css("display", "none");
            switch (dirType) {
                case "-1":
                    {
                        $("#div_lndztz").css("display", "block");
                        break;
                    }
                case "0":
                    {
                        //获取当前年度数据
                        $.ajax({
                            type: "GET",
                            url: "../../../../eAccount/system/dirManagerData.aspx",
                            data: "method=getcurrentyear",
                            success: function(result) {
                                if (result == "-1") {
                                    alert("加载失败！");
                                }
                                else {
                                    if (result != "") {
                                        $("#txt_bnddztz").val(result);
                                        $("#div_bnddztz").css("display", "block");
                                        
                                    }
                                }
                            }
                        });
                       
                        break;
                    }
                case "1":
                    {
                        //获取年度数据
                        $.ajax({
                            type: "GET",
                            url: "../../../../eAccount/system/dirManagerData.aspx",
                            data: "method=getyear",
                            success: function(result) {
                                if (result == "-1") {
                                    alert("加载失败！");
                                }
                                else {
                                    if (result != "") {
                                        var _year = $("#div_zdnddztz").val();
                                        var myObject = eval('(' + result + ')');
                                        for (var i = 0; i < myObject.length; i++) {
                                            //myObject[i]["FYear"]
                                            $("#dirYear").append("<option value='" + myObject[i]["FYear"] + "'>" + myObject[i]["FYear"] + "</option>");
                                        }
                                        if (_year != "") {
                                            $("#dirYear").val(_year);
                                        }
                                        $("#div_zdnddztz").css("display", "block");
                                    }
                                }
                            }
                        });
                        break;
                    }
                case "2":
                    {
                        $("#div_zdjtdztz").css("display", "block");

                        break;
                    }
            }
        }
		 
    </script>

</head>
<body scroll="no" style="overflow: hidden">
    <div id="divInfo">
        <div id="divUpload">
            <form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();">
            <span fcklang="EuImgSelectFileLbl">Select file</span><br />
            <input id="txtUploadFile" style="width: 100%; padding: 3px 2px;" type="file" size="40" name="NewFile" /><br />
            <br />
            <input id="btnUpload" type="submit" value="Send it to the Server" fcklang="EuImgContinueBtn" />
            <iframe name="UploadWindow" style="display: none" src="fckblank.html"></iframe>
            </form>
        </div>
        <div id="divProperties" style="display: none">
            <input id="txtUrl" style="display: none;" type="text" onblur="UpdatePreview();">
            <table cellspacing="1" cellpadding="1" border="0" width="100%" height="100%">
                <tr>
                    <td valign="top">
                        <table cellspacing="0" cellpadding="0" width="100%" border="0">
                            <tr>
                                <td valign="top">
                                    <br />
                                    <table cellspacing="0" cellpadding="0" border="0">
                                        <tr>
                                            <td nowrap>
                                                <span fcklang="DlgImgWidth">Width</span>&nbsp;</td>
                                            <td>
                                                <input type="text" size="3" id="txtWidth" onkeyup="OnSizeChanged('Width',this.value);"></td>
                                            <td nowrap rowspan="2">
                                                <div id="btnLockSizes" class="BtnLocked" onmouseover="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ) + ' BtnOver';" onmouseout="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' );" title="Lock Sizes" onclick="SwitchLock(this);">
                                                </div>
                                                <div id="btnResetSize" class="BtnReset" onmouseover="this.className='BtnReset BtnOver';" onmouseout="this.className='BtnReset';" title="Reset Size" onclick="ResetSizes();">
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td nowrap>
                                                <span fcklang="DlgImgHeight">Height</span>&nbsp;</td>
                                            <td>
                                                <input type="text" size="3" id="txtHeight" onkeyup="OnSizeChanged('Height',this.value);"></td>
                                        </tr>
                                    </table>
                                    <br />
                                    <table cellspacing="0" cellpadding="0" border="0">
                                        <tr>
                                            <td nowrap>
                                                <span fcklang="DlgImgBorder">Border</span>&nbsp;</td>
                                            <td>
                                                <input type="text" size="2" value="" id="txtBorder" onkeyup="UpdatePreview();"></td>
                                        </tr>
                                        <tr>
                                            <td nowrap>
                                                <span fcklang="DlgImgHSpace">HSpace</span>&nbsp;</td>
                                            <td>
                                                <input type="text" size="2" id="txtHSpace" onkeyup="UpdatePreview();"></td>
                                        </tr>
                                        <tr>
                                            <td nowrap>
                                                <span fcklang="DlgImgVSpace">VSpace</span>&nbsp;</td>
                                            <td>
                                                <input type="text" size="2" id="txtVSpace" onkeyup="UpdatePreview();"></td>
                                        </tr>
                                        <tr>
                                            <td nowrap>
                                                <span fcklang="DlgImgAlign">Align</span>&nbsp;</td>
                                            <td>
                                                <select id="cmbAlign" onchange="UpdatePreview();">
                                                    <option value="" selected></option>
                                                    <option fcklang="DlgImgAlignLeft" value="left">Left</option>
                                                    <option fcklang="DlgImgAlignAbsBottom" value="absBottom">Abs Bottom</option>
                                                    <option fcklang="DlgImgAlignAbsMiddle" value="absMiddle">Abs Middle</option>
                                                    <option fcklang="DlgImgAlignBaseline" value="baseline">Baseline</option>
                                                    <option fcklang="DlgImgAlignBottom" value="bottom">Bottom</option>
                                                    <option fcklang="DlgImgAlignMiddle" value="middle">Middle</option>
                                                    <option fcklang="DlgImgAlignRight" value="right">Right</option>
                                                    <option fcklang="DlgImgAlignTextTop" value="textTop">Text Top</option>
                                                    <option fcklang="DlgImgAlignTop" value="top">Top</option>
                                                </select>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    &nbsp;&nbsp;&nbsp;</td>
                                <td width="100%" valign="top">
                                    <table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed">
                                        <tr>
                                            <td>
                                                <span fcklang="DlgImgPreview">Preview</span></td>
                                        </tr>
                                        <tr>
                                            <td valign="top">
                                                <iframe class="ImagePreviewArea" src="fck_image/fck_image_preview.html" frameborder="0" marginheight="0" marginwidth="0"></iframe>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span fcklang="EuDlgImgAlt">描述</span><br />
                        <input id="txtAlt" style="width: 100%" type="text"><br />
                    </td>
                </tr>
                <tr>
                    <td>
                        选择文明台帐：
                        <br />
                        文明台帐类型:<select id="dirType" onchange="dirTypeChange()">
                            <option value="-1">历年电子台帐</option>
                            <option value="0">本年度电子台帐</option>
                            <option value="1">指定年度电子台帐</option>
                            <option value="2">指定具体电子台帐</option>
                        </select>
                        <br />
                        <div id="div_lndztz" style="display: none">
                        </div>
                        <div id="div_bnddztz" style="display: none">
                        <input id="txt_bnddztz" style="width: 100%" type="text"  readonly>
                        </div>
                        <div id="div_zdnddztz" style="display: none">
                            <select id="dirYear" >
                              
                            </select>
                        </div>
                        <div id="div_zdjtdztz" style="display: none">
                            <input id="txt_dirid" style="width: 80%" type="text"  readonly>
                            <input type="button" value="选择" onclick="OpenCatalogSelector()" />
                            <input id="hdtxtdir" type="hidden" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </div>
</body>
</html>
